
// <copyright file="MemoryDumpScheduleInfo.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The memory dump schedule info.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Diagnostics
{
    using SubhadraSolutions.Sharp.Utils.Contracts;

    /// <summary>
    /// The memory dump schedule info.
    /// </summary>
    public class MemoryDumpScheduleInfo
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="MemoryDumpScheduleInfo"/> class.
        /// </summary>
        public MemoryDumpScheduleInfo()
        {
            this.IsContinuous = true;
            this.IntervalToTryInSeconds = 30;
            this.CaptureDumpOnEveryRetryFailed = false;
            this.CaptureDumpIfRetryIsSuccess = false;
            this.MaximumNumberOfContinuousFailuresToDump = 1;
            this.DumpType = MemoryDumpTypes.MiniDumpWithFullMemory;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        /// Gets or sets a value indicating whether capture dump if retry is success.
        /// </summary>
        public bool CaptureDumpIfRetryIsSuccess { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether capture dump on every retry failed.
        /// </summary>
        public bool CaptureDumpOnEveryRetryFailed { get; set; }

        /// <summary>
        /// Gets or sets the dump directory path.
        /// </summary>
        public string DumpDirectoryPath { get; set; }

        /// <summary>
        /// Gets or sets the dump type.
        /// </summary>
        public MemoryDumpTypes DumpType { get; set; }

        /// <summary>
        /// Gets or sets the interval to try in seconds.
        /// </summary>
        public long IntervalToTryInSeconds { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether is continuous.
        /// </summary>
        public bool IsContinuous { get; set; }

        /// <summary>
        /// Gets or sets the maximum number of continuous failures to dump.
        /// </summary>
        public int MaximumNumberOfContinuousFailuresToDump { get; set; }

        /// <summary>
        /// Gets or sets the process id or name.
        /// </summary>
        public string ProcessIdOrName { get; set; }

        /// <summary>
        /// Gets or sets the strategy.
        /// </summary>
        public IConditionStrategy Strategy { get; set; }

        #endregion Public Properties
    }
}
